package com.onlinemusic.service;

import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

public interface ObjectStoreService {
  /**
   * 上传文件到oss
   * @param dirName
   * @param objectName
   * @param file
   * @return
   * @throws IOException
   */
  String uploadFile(String dirName, String objectName, MultipartFile file) throws IOException;

  /**
   * 删除oss文件
   * @param objectName
   * @return
   */
  boolean deleteFile(String objectName);

  /**
   * 下载oss文件
   * @param objectUrl
   * @param targetFilePath
   */
  void downloadFile(String objectUrl, String targetFilePath);

}
